import request from '@/utils/request'
export function listCategoryByPage(query){
  return request({
    url: '/category/page',
    method: 'get',
    params: query
  })
}
// 删除产品
export function delCategory(data) {
  return request({
    url: '/category/deleteCategory',
    method: 'post',
    data
  })
}
// 获取产品列表
export function getCategoryList(data) {
    return request({
      url: '/category/listCategory',
      method: 'post',
      data
    })
  }

// 新增产品
export function addCategory(data) {
  return request({
    url: '/category/insertCategory',
    method: 'post',
    data
  })
}

// 修改产品
export function updateCategory(data) {
  return request({
    url: '/category/updateCategoryInfo',
    method: 'post',
    data
  })
}
// // 批量删除产品
// export function delProducts(productIdArray){
//   const productIdString = productIdArray.join(',')
//   return request({
//     url: `/product/removes/${productIdString}`,   
//     method: 'delete'  
//   })
// }
